package org.ands.xml;

import java.util.Iterator;

import javax.xml.XMLConstants;
import javax.xml.namespace.NamespaceContext;

public class NamespaceContextMCP implements NamespaceContext{
	 
	 public static String AIMS_NAMESPACE_URI_MCP = "http://bluenet3.antcrc.utas.edu.au/mcp";
	 public static String AIMS_NAMESPACE_PREFIX_MCP = "mcp";
	 
	 public static String AIMS_NAMESPACE_URI_GMD = "http://www.isotc211.org/2005/gmd";
	 public static String AIMS_NAMESPACE_PREFIX_GMD = "gmd";
	 
	 public static String AIMS_NAMESPACE_URI_GCO = "http://www.isotc211.org/2005/gco";
	 public static String AIMS_NAMESPACE_PREFIX_GCO = "gco";
	 
	 public static String AIMS_NAMESPACE_URI_GML = "http://www.opengis.net/gml";
	 public static String AIMS_NAMESPACE_PREFIX_GML = "gml";
	 
       public String getNamespaceURI(String prefix)
       {
           if (prefix.equals(AIMS_NAMESPACE_PREFIX_MCP)){
           	return AIMS_NAMESPACE_URI_MCP;
           }
          
           if (prefix.equals(AIMS_NAMESPACE_PREFIX_GMD)){
              	return AIMS_NAMESPACE_URI_GMD;
           }
              	
           if (prefix.equals(AIMS_NAMESPACE_PREFIX_GCO)){
        	   return AIMS_NAMESPACE_URI_GCO;
           }
           
           if (prefix.equals(AIMS_NAMESPACE_PREFIX_GML)){
        	   return AIMS_NAMESPACE_URI_GML;
           }
           
           assert(false);	
           return XMLConstants.NULL_NS_URI;
           
       }
       
       public String getPrefix(String namespace)
       {
          if (namespace.equals(AIMS_NAMESPACE_URI_MCP)){
           		return AIMS_NAMESPACE_PREFIX_MCP;
           }
           
          if (namespace.equals(AIMS_NAMESPACE_URI_GMD)){
          		return AIMS_NAMESPACE_PREFIX_GMD;
          }
           
          if (namespace.equals(AIMS_NAMESPACE_URI_GCO)){
          		return AIMS_NAMESPACE_PREFIX_GCO;
          }
          
          if (namespace.equals(AIMS_NAMESPACE_URI_GML)){
        		return AIMS_NAMESPACE_PREFIX_GML;
          }
           
           assert(false);
           return null;
       }

       public Iterator<?> getPrefixes(String namespace)
       {
           return null;
       }
} 